
// 自定义指令, v-imgerror 图片加载失败的指令
export const imgerror = {
  inserted(el, binding) {
    el.onerror = function() {
    //   console.log(binding)
      el.src = binding.value || 'https://img0.baidu.com/it/u=3983622294,3123611233&fm=26&fmt=auto&gp=0.jpg'
      // el.src = binding.value
    }
  }
}

export const red = {
  inserted(el) {
    el.style.color = 'red'
  }
}
